Add GtkConstraintTarget
authorMatthias Clasen <mclasen@redhat.com>
Tue, 25 Jun 2019 19:04:05 +0000 (15:04 -0400)
committerEmmanuele Bassi <ebassi@gnome.org>
Sun, 30 Jun 2019 22:42:44 +0000 (23:42 +0100)
This is an marker interface that we will
use to accept other things that widgets
in constraints.

gtk/gtkconstraint.c
gtk/gtkconstraint.h

index d0c152b56d4a408b13125c27859db9d0761ffb12..d7bf3e0a088f8766235fcaad400089b3dc9f4822 100644 (file)
@@ -581,3 +581,17 @@ gtk_constraint_detach (GtkConstraint *constraint)
   constraint->constraint_ref = NULL;
   constraint->solver = NULL;
 }
+
+typedef struct _GtkConstraintTargetInterface GtkConstraintTargetInterface;
+
+struct _GtkConstraintTargetInterface
+{
+  GTypeInterface g_iface;
+};
+
+G_DEFINE_INTERFACE (GtkConstraintTarget, gtk_constraint_target, G_TYPE_OBJECT)
+
+static void
+gtk_constraint_target_default_init (GtkConstraintTargetInterface *iface)
+{
+}
index 1ca9fd7f5e9718133c3167b438146259d787952e..1467c86d9c6a45e0ba86d51e5b0431379b1d8131 100644 (file)
 
 G_BEGIN_DECLS
 
+typedef struct _GtkConstraintTarget GtkConstraintTarget;
+
+#define GTK_TYPE_CONSTRAINT_TARGET (gtk_constraint_target_get_type ())
+
+/**
+ * GtkConstraintTarget:
+ *
+ * The GtkConstraintTarget interface is implemented by objects that
+ * can be used as source or target in #GtkConstraints. Besides
+ * #GtkWidget, it is also implemented by #GtkConstraintGuide.
+ */
+
+GDK_AVAILABLE_IN_ALL
+G_DECLARE_INTERFACE (GtkConstraintTarget, gtk_constraint_target, GTK, CONSTRAINT_TARGET, GObject)
+
 #define GTK_TYPE_CONSTRAINT (gtk_constraint_get_type ())
 
 /**